<pre id="sh_015_xregexp" class="brush: js;" title="XRegExp tests">
// test XRegExp
</pre>

<script type="text/javascript">
queue(function()
{
	module('015_xregexp');

	test('test XRegExp', function()
	{
		(function(){
			var desc = 'Overridden RegExp.exec on numeric arguments with empty captures',
				match;
			try {
				match = /(x)?(\d)(\d)/.exec( 213 );
				ok(match, desc);
				ok(match[0] === "21", 'matched string');
				ok(match[1] === undefined, 'empty capture group is undefined');
				ok(match[2] === "2", 'matched capture group returned expected string');
				ok(match[3] === "1", 'matched capture group returned expected string');
			} catch( ex ) {
				ok(false, 'Caught Exception: ' + desc + '(' + ex.description + ')');
			}
		})();
	});
});
</script>
